package com.taotao.springboot2.warmflow;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.Example;
import io.swagger.annotations.ExampleProperty;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/***
 *
 * @since:knife4j-springdoc-openapi-demo 1.0
 * @author <a href="mailto:xiaoymin@foxmail.com">xiaoymin@foxmail.com</a> 
 * 2020/03/15 20:38
 */
@Api(tags = "用户模块1")
@RestController
@RequestMapping("/user1")
public class UserOneController {
    @ApiOperation(value = "创建用户", notes = "根据姓名创建用户")
    @GetMapping("/create")
    @ApiResponse(code = 202, message = "OK",
            examples = @Example(value = @ExampleProperty(value = "{\"message\": \"finished\", \"id\": \"101\" }")))
    public ResponseEntity<String> create(String name) {
        return ResponseEntity.ok(name);
    }

}
